package mythesis.test;
import mythesis.controller.TileGenerator;
import mythesis.gui.tile.*;
import mythesis.gui.popup.*;
import javafx.stage.*;
import javafx.scene.*;
import javafx.ext.swing.SwingButton;

/*******************************************************************************
*							Global Variables
*******************************************************************************/

var arrListOfTiles:Tile[];														// List of all tiles.
var tileGenerator:TileGenerator = new TileGenerator();							// Controller used to generate list of all tiles.

/*******************************************************************************
*							Initialization
*******************************************************************************/

arrListOfTiles = tileGenerator.getTiles();

/*******************************************************************************
*							   Actions
*******************************************************************************/
{{{{{arrListOfTiles[1] as Tile}.laman(2) as TileContent}
   .laman(1) as TileField}.laman(0) as TilePopupButton}
   .laman(0) as SwingButton}
   .action = function()
   {
      //var p = Popup{};
      //insert p into grpPopup.content;
   }

/*******************************************************************************
*							   Groups
*******************************************************************************/
var grpEditTiles = for (i in [0..1])
{
    Group
    {
        content:
        [
        	arrListOfTiles[i]
        ]
    }
}

var grpPopup = Group
{
    content: 
    [
    	//Popup{}
    ]
}

Stage
{
    width: 940;
    height: 540;
    scene : Scene
    {
    	content: bind
    	[
    		grpEditTiles,
    		grpPopup
    	]
    }
}